home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3 (Developer)…68k, x86, SPARC, PA-RISC] / NeXTSTEP 3.3 Dev Intel.iso / NextDeveloper / Headers / appkit / NXDataLink.h < prev    next >
Text File  |  1992-03-17  |  3KB  |  96 lines

  1. /*
  2.     NXDataLink
  3.     Application Kit, Release 3.0
  4.     Copyright (c) 1991, NeXT, Inc.  All rights reserved. 
  5. */
  6.  
  7. #import <objc/Object.h>
  8. #import <objc/hashtable.h>
  9. #import "Pasteboard.h"
  10. #import <sys/types.h>
  11. #import "NXSelection.h"
  12. @class NXDataLinkManager;
  13.  
  14. typedef enum _NXDataLinkUpdateMode {
  15.     NX_UpdateContinuously = 1,
  16.     NX_UpdateWhenSourceSaved = 2,
  17.     NX_UpdateManually = 3,
  18.     NX_UpdateNever = 4
  19. } NXDataLinkUpdateMode;
  20.  
  21. typedef enum _NXDataLinkDisposition {
  22.     NX_LinkInDestination = 1,
  23.     NX_LinkInSource = 2,
  24.     NX_LinkBroken = 3
  25. } NXDataLinkDisposition;
  26.  
  27. extern NXAtom NXDataLinkPboardType;
  28.  
  29. /* A persistent identifier of links on the destination side. Never 0. */
  30. typedef int NXDataLinkNumber;
  31.  
  32. /* filename suffix used for saved links */
  33. extern NXAtom NXDataLinkFilenameExtension;
  34.  
  35. @interface NXDataLink : Object {
  36.   /* these instance variables are NOT part of the API, are subject to change in future releases */
  37.   @private
  38.     NXSelection *srcSelection;
  39.     id srcFile;
  40.     char *srcAppName;
  41.     id srcMgr;
  42.     NXSelection *destSelection;
  43.     char *destFileName;
  44.     char *destAppName;
  45.     id destMgr;
  46.     time_t lastUpdateTime;
  47.     NXDataLinkNumber linkNum;
  48.     struct _dlFlags {
  49.     unsigned int dirty:1;
  50.     unsigned int memorable:1;
  51.     unsigned int mode:2;
  52.     unsigned int canUpdateContinuously:1;
  53.     unsigned int updateMode:4;
  54.     unsigned int appVerifiesLinks:1;
  55.     unsigned int willOpenSource:1;
  56.     unsigned int willUpdate:1;
  57.     unsigned int dead:1;
  58.     unsigned int cyclical:1;
  59.     unsigned int RESERVED:2;
  60.     } dlFlags;
  61.     NXAtom *types;
  62.     unsigned int _reservedDataLink1;
  63. }
  64.  
  65. - initLinkedToSourceSelection:(NXSelection *)selection managedBy:linkManager supportingTypes:(const char *const *)newTypes count:(int)numTypes;
  66. - initLinkedToFile:(const char *)filename;
  67. - initFromPasteboard:(Pasteboard *)pasteboard;
  68. - initFromFile:(const char *)filename;
  69. - copyFromZone:(NXZone *)zone;
  70.  
  71. - writeToPasteboard:(Pasteboard *)pasteboard;
  72. - writeToFile:(const char *)filename;
  73.  
  74. - saveLinkIn:(const char *)directoryName;
  75.  
  76. - (const NXAtom *)types;
  77. - (NXSelection *)sourceSelection;
  78. - (NXSelection *)destinationSelection;
  79. - (const char *)sourceFilename;
  80. - (const char *)destinationFilename;
  81. - (const char *)sourceAppName;
  82. - (const char *)destinationAppName;
  83. - (NXDataLinkManager *)manager;
  84. - (time_t)lastUpdateTime;
  85. - (NXDataLinkNumber)linkNumber;
  86. - (NXDataLinkDisposition)disposition;
  87.  
  88. - updateDestination;
  89. - openSource;
  90. - break;
  91. - setUpdateMode:(NXDataLinkUpdateMode)mode;
  92. - (NXDataLinkUpdateMode)updateMode;
  93. - sourceEdited;
  94.  
  95. @end
  96.